<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <script>
    // const s1 = new Set();
    // console.log(s1.size);

    // const s2 = new Set(["a", "b"]);
    // console.log(s2.size);

    // 可以利用 Set 数据结构做数组去重
    // const s3 = new Set(["a", "b", "a", "b"]);
    // console.log(s3);
    // console.log(s3.size);
    // const ary = [...s3];
    // console.log(ary);

    // 变量 set 数据结构 从中取值
    const s4 = new Set(["a", "b", "c"]);
    s4.forEach(value => {
        console.log(value);
    })
    </script>
</body>
</html>